#ifndef STATISTICSTAB_H
#define STATISTICSTAB_H

#include <QWidget>
#include <QComboBox>
#include <QDateEdit>
#include <QPushButton>
#include <QTableView>
#include <QStandardItemModel>
#include <QLabel>

class StatisticsTab : public QWidget {
    Q_OBJECT

public:
    explicit StatisticsTab(QWidget *parent = nullptr);

private slots:
    void onQueryClicked();

private:
    QComboBox *modeComboBox;
    QDateEdit *dateEdit;
    QPushButton *queryButton;
    QTableView *tableView;
    QLabel *summaryLabel;

    QStandardItemModel *tableModel;

    void queryDaily(const QDate &date);
    void queryMonthly(const QDate &month);
    void updateSummary(const QString &text);
};

#endif // STATISTICSTAB_H
